#!/usr/bin/python

import sys

GetScore = {'0':0, '1':1, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9, 'X':10}
file=open(sys.argv[1], "r")
for line in file.readlines():
    ans = xnum = i = 0
    while (i>>1) + xnum <= 19:
        if line[i]=='X':
            ans += 20 if line[i+4]=='/' else 10 + GetScore[line[i+2]] + GetScore[line[i+4]]
            xnum += 1
        elif line[i]=='/': ans += 10 - GetScore[line[i-2]] + GetScore[line[i+2]]
        else: ans += GetScore[line[i]]
        i += 2
    print ans
